

            


            
using System;
using System.Collections.Generic;
using System.Web;
namespace DatabaseComponent
{
     public partial class RegisteredCourses
     {

            //Write any additional methods or properties here 
            //Don't modify any genrated classes


         public List<CoursesScoes> lstCoursesScoes
         {
             get
             {
                 CoursesScoesDB objCoursesScoesDB = new CoursesScoesDB(ConnectionStrings.LMS);
                 return objCoursesScoesDB.getCoursesScoesByRegisteredCoursesID(ID);
             }
         }





         private Courses _objCourses = null;

         public Courses objCourses
         {
             get {

                 if (_objCourses == null)
                 {
                     CoursesDB objCoursesDB = new CoursesDB(ConnectionStrings.LMS);
                     List<Courses> lstCourses = objCoursesDB.getCoursesByID(CoursesID);
                     if (lstCourses.Count == 0)
                         return new Courses();


                     _objCourses = lstCourses[0];

                 }
                                 
                 
                 
                 return _objCourses; }
             
         }



         Persons _objPersons = null;
        public Persons objPersons
        {
          get {

              if (_objPersons == null)
              {
                  PersonsDB objPersonsDB = new PersonsDB(ConnectionStrings.LMS);
                  List<Persons> lstPersons = objPersonsDB.getPersonsByGenID(EmployeesID);
                  if (lstPersons.Count == 0)
                  {
                      return new Persons();
                  }

                  _objPersons = lstPersons[0];

              }
              
              
              
              return _objPersons; }
          
        }



       public  List<UserLogs> lstUserLogs
        {
            get
            {
                UserLogsDB objUserLogsDB = new UserLogsDB(ConnectionStrings.LMS);
                return objUserLogsDB.getUserLogsByRegisteredCoursesID(this.ID);
            }
        }


       public List<FinishedExams> lstFinishedExams
       {
           get
           {
               FinishedExamsDB objFinishedExamsDB = new FinishedExamsDB(ConnectionStrings.LMS);
               return objFinishedExamsDB.getFinishedExamsByRegisteredCoursesID (this.ID);
           }
       }


       public List<Exams> lstExams
       {
           get
           {
               ExamsDB objExamsDB = new ExamsDB(ConnectionStrings.LMS);
               return objExamsDB.getExamsByRegisteredCoursesID(this.ID);
           }
       }

         
     

}
}
